import React, { FunctionComponent } from 'react'

type CardProps = {
    title: string,
    paragraph: string
}

interface IProps {
    title: string
    paragraph: string
}

// 写法一
const CardOne = ({ title, paragraph }: CardProps) => {
    return (
        <aside>
            <h2>{title}</h2>
            <p>{paragraph}</p>
        </aside>
    )
}

// 写法二
const CardTwo: FunctionComponent<IProps> = ({ title, paragraph }) => {
    return (
        <aside>
            <h2>{title}</h2>
            <p>{paragraph}</p>
        </aside>
    )
}

export default CardTwo